﻿#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include "ComposedTable.h"

using namespace std;

int main()
{
    vector<string> targets;
    ComposedTable composedTable("composed_table.txt");
    ifstream fin("composed_table.txt");
    string line;
    while (getline(fin, line))
    {
        auto sv = composedTable.splitString(line);
        if (sv.size() > 1)
        {
            targets.push_back(sv[0]);
        }
    }
    /*vector<string> targets = { "火魔杖", "炼金引擎", "科学机器"};*/
    int i = 0;
    for (const auto& t : targets)
    {
        cout << i++ << ": " << t << endl;
        composedTable.addProp(t);
    }
    //composedTable.addProp("灵子分解器");
    composedTable.printResult();

    return 0;
}
